package com.bootdo.zk.service;

import org.apache.zookeeper.CreateMode;
import org.junit.Before;
import org.junit.Test;

import static org.junit.Assert.*;

public class ZKServiceTest {

    ZKService zk;
    @Before
    public void init() {
        zk = new ZKService("127.0.0.1:2181", 6000000);
    }

    @Test
    public void testZkservice() throws Exception{
        final String heh = zk.createNode("/heh", "fangkkkk".getBytes(), CreateMode.PERSISTENT);
        System.out.println(heh);
        Thread.sleep(20000);
    }
}